#include <QtGui/QMainWindow>
#include "ui_ExplorBotDialog.h"
#include <vector>
#include <map>
#include <string>

class QLineEdit;
class DIVA_VM;
class QCheckBox;
class QLabel;
class ExplorBot;

class ExplorBotDialog: public QMainWindow
{
	Q_OBJECT

public:

	ExplorBotDialog(QWidget *parent = 0, Qt::WFlags flags = 0, DIVA_VM* vm = NULL,ExplorBot* eb=NULL);
	void nweDialog(ExplorBot* eb);
	//~ExplorBotDialog();

public slots:
	void setupNewExplorBot();
	void unFocus();
	void save();
	void clickAllRefStateChange(bool i);
	void clickSelectRefStateChange(bool i);
	void clickExploreAllChange(bool i);

private:
	Ui::ExplorBotDialog ui;
	DIVA_VM* selectedVM;
	QLabel* namelabel;
	QLineEdit* botNameArea;
	QLineEdit* varnmaeLine;
	QLineEdit* maxlevelLine;
	QLineEdit* maxNumLine;
	QVBoxLayout* _refsLayout;
	ExplorBot* _existEB;
	bool _save;
	QCheckBox* allc;
	QCheckBox* notallc;
	std::vector<std::string> _selectRefList;
	std::vector<QCheckBox*> _checkboxlist;
	std::vector<QLineEdit*> _typeRefList;

	void setStyle();
	void initDialog(DIVA_VM* vm = NULL);
	void clickAllRef();
	void clickSelectRef();
	void clearRefParameterLayout();
	void clickExploreAll(bool i);
	void addNewRefLayout(std::string type,std::string target);

};
